package stats;

import java.util.HashMap;

import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

public class CountSiblings {
	public int CountElSiblings (Element el) {
		return el.siblingNodes().size();
	}
	
	public HashMap<String,String> MapSiblingsCount (Elements elements) {
		HashMap<String,String> hm = new HashMap<String,String>();
		for (Element el : elements) {
			hm.put(el.nodeName(), Integer.toString(CountElSiblings(el)));
		}
		return hm;
	}
}
